import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import h5Login from '@/views/h5Login.vue'
import pcLogin from '@/views/pcLogin.vue'
import pch5 from '@/views/pch5.vue'

Vue.use(VueRouter)

// const routes = [
//   {
//     path: '/',
//     component: () => import('@/views/pch5.vue')
//   },
//   {
//     path: '/h5Login',
//     component: () => import('@/views/h5Login.vue')
//   },
//   {
//     path: '/pcLogin',
//     name: 'pcLogin',
//     component: () => import(/* webpackChunkName: "about" */ '../views/pcLogin.vue')
//   }
// ]
const routerM = [
  {
    path: '/',
    component: () => import('@/views/h5Login.vue')
  }
]
const routerPc = [
  {
    path: '/',
    name: 'pcLogin',
    component: () => import(/* webpackChunkName: "about" */ '../views/pcLogin.vue')
  }
]
var routes = []
let Adaptive = /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
if (navigator.userAgent.match(Adaptive)) {
  routes = routerM
} else {
  routes = routerPc
}

const router = new VueRouter({
  routes
})


export default router
